1. Field of the Invention
The present invention relates to an autofocus apparatus, an autofocus method, and a program which can be utilized in a system which photographs an image of an object for purposes of measurement and observation and the like, for example.
2. Description of Related Art
Conventionally, a system for performing observation and measurements and the like is known, in which an image obtained by photographing an object is processed by a computer. Such a system is employed in digital microscopes, CNC (computer numerical control) image measuring apparatuses and the like, for example.
Japanese Patent Laid-open Publication No. Hei 09-304685 discloses an autofocus apparatus which can be applied to the above-mentioned digital microscopes, image measuring apparatuses and the like. In the autofocus apparatus disclosed in Japanese Patent Laid-open Publication No. Hei 09-304685, a predetermined pattern is projected onto a measurement surface of a measured object. Autofocusing is performed based on contrast information of a photographed image of the predetermined pattern. This enables focusing on measured objects of various materials without being restricted by the material of the measured object (see, for example, paragraphs [0004], [0019], and [0020] of Japanese Patent Laid-open Publication No. Hei 09-304685).
In order to perform measurements and observations with high precision, photographing is frequently performed by changing a magnification of an optical system which includes an objective lens and the like. Thus, it is required that autofocusing can be performed with high precision even when the magnification of the optical system is changed.
In view of the above circumstance, an advantage of the present invention is an autofocus apparatus, an autofocus method, and a program in which autofocusing can be performed with high precision even when the magnification is changed.